<script setup lang="ts">
import { zhCN, zhTW, dateZhCN, dateZhTW, darkTheme, lightTheme } from 'naive-ui'
import { Sunny, Moon } from '@vicons/ionicons5'
type LocaleType = 'zhCN' | 'zhTW'
const locale = ref<LocaleType>('zhCN')
const isDark = ref(false)
const langOpt = [
  { label: '简体中文', key: 'zhCN' },
  { label: '繁体中文', key: 'zhTW' },
]
const langList = {
  zhCN: { locale: zhCN, label: '简体中文', dataLocale: dateZhCN },
  zhTW: { locale: zhTW, label: '繁体中文', dataLocale: dateZhTW },
}
const handleSelect = (e: LocaleType) => {
  locale.value = e
}
</script>
<template>
  <NConfigProvider
    :locale="langList[locale].locale"
    :date-locale="langList[locale].dataLocale"
    :theme="isDark === true ? darkTheme : lightTheme"
  >
    <NGlobalStyle />
    <!-- vue-router占位 -->
    <!-- <router-view/> -->
  </NConfigProvider>
</template>
<style>
  
</style>

